package com.sc.nft.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class ShuJuBaoFaceCheckVO {


    @ApiModelProperty(name = "结果状态")
    private Boolean status = Boolean.FALSE;

    @ApiModelProperty(name = "返回结果")
    private String result;

    @ApiModelProperty(name = "返回结果json")
    private String resultJson;

    public static ShuJuBaoFaceCheckVO buildFail(Boolean aFalse, String result) {
        ShuJuBaoFaceCheckVO shuJuBaoFaceCheckVO = new ShuJuBaoFaceCheckVO();
        shuJuBaoFaceCheckVO.setResult(result);
        return shuJuBaoFaceCheckVO;
    }


    public static ShuJuBaoFaceCheckVO ShuJuBaoFaceCHeckCodeRet(String code) {
        switch (code){
            case "10001" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"查询无结果");
            case "10002" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"参数错误");
            case "10003" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"服务端请求失败");
            case "10004" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"图中没有人脸");
            case "10005" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"无法解析人脸");
            case "10006" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"图片的数量错误");
            case "10007" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"人脸有被遮挡");
            case "10008" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"人脸模糊");
            case "10009" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"人脸光照不好");
            case "10010" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"人脸不完整");
            case "10011" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"活体检测未通过");
            case "10012" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"质量检测未通过 左眼 遮挡程度过高");
            case "10013" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"质量检测未通过 右眼 遮挡程度过高");
            case "10014" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"质量检测未通过 左脸 遮挡程度过高");
            case "10015" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"质量检测未通过 右脸 遮挡程度过高");
            case "10016" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"质量检测未通过 下巴遮挡程度过高");
            case "10017" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"质量检测未通过 鼻子遮挡程度过高");
            case "10018" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"质量检测未通过 嘴巴 遮挡程度过高");
            case "10019" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"图片尺寸太大");
            case "10020" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"图片非法 鉴黄未通过");
            case "10021" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"图片非法 含有政治敏感人物");
            case "10022" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"人脸未面向正前方 （人脸的角度信息大于30度）");
            case "10023" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"视频中人脸质量较差");
            case "10039" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"检测超时");
            case "10040" :
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"没有拿到视频");
            default:
                return ShuJuBaoFaceCheckVO.buildFail(Boolean.FALSE,"未知错误");
        }
    }

    public static String ShuJuBaoFaceCHeckCodeGetMessage(String code) {
        switch (code){
            case "10001" :
                return "查询无结果";
            case "10002" :
                return "参数错误";
            case "10003" :
                return "服务端请求失败";
            case "10004" :
                return "图中没有人脸";
            case "10005" :
                return "无法解析人脸";
            case "10006" :
                return "图片的数量错误";
            case "10007" :
                return "人脸有被遮挡";
            case "10008" :
                return "人脸模糊";
            case "10009" :
                return "人脸光照不好";
            case "10010" :
                return "人脸不完整";
            case "10011" :
                return "活体检测未通过";
            case "10012" :
                return "质量检测未通过 左眼 遮挡程度过高";
            case "10013" :
                return "质量检测未通过 右眼 遮挡程度过高";
            case "10014" :
                return "质量检测未通过 左脸 遮挡程度过高";
            case "10015" :
                return "质量检测未通过 右脸 遮挡程度过高";
            case "10016" :
                return "质量检测未通过 下巴遮挡程度过高";
            case "10017" :
                return "质量检测未通过 鼻子遮挡程度过高";
            case "10018" :
                return "质量检测未通过 嘴巴 遮挡程度过高";
            case "10019" :
                return "图片尺寸太大";
            case "10020" :
                return "图片非法 鉴黄未通过";
            case "10021" :
                return "图片非法 含有政治敏感人物";
            case "10022" :
                return "人脸未面向正前方 （人脸的角度信息大于30度）";
            case "10023" :
                return "视频中人脸质量较差";
            case "10039" :
                return "检测超时";
            case "10040" :
                return "没有拿到视频";
            default:
                return "未知错误";
        }
    }
}
